<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="c_jstl"%>
<%@taglib prefix="fmt" uri="fmt_jstl"%>
<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]-->
<!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]-->
<!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!-->
<html lang="en">
<!--<![endif]-->

<head>

<!-- Basic Page Needs
  ================================================== -->
<meta charset="utf-8">
<title>7 you 博客内容</title>
<meta name="description" content="">
<meta name="author" content="">
<!--[if lt IE 9]>
        <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->

<!-- Mobile Specific Metas
  ================================================== -->
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">

<!-- CSS
  ================================================== -->
<link rel="stylesheet" href="css/base.css">
<link rel="stylesheet" href="css/skeleton.css">
<link rel="stylesheet" href="css/screen.css">
<link rel="stylesheet" href="css/mediaelementplayer.css" />
<!--[if IE 7]>
        <link rel="stylesheet" href="stylesheets/ie7.css">
    <![endif]-->

<!-- Favicons
    ================================================== -->
<link rel="shortcut icon" href="images/favicon.ico">
<link rel="apple-touch-icon" href="images/apple-touch-icon.png">
<link rel="apple-touch-icon" sizes="72x72"
	href="images/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="114x114"
	href="images/apple-touch-icon-114x114.png">

<!-- Fonts
    ================================================== -->
<link
	href='http://fonts.googleapis.com/css?family=Open+Sans:400,400italic,700,700italic,300,300italic'
	rel='stylesheet' type='text/css'>

<!-- Scripts
    ================================================== -->
<script src="js/jquery-1.7.min.js" type="text/javascript"></script>
<script src="js/jquery.easing.1.3.js" type="text/javascript"></script>
<script src="js/jquery.animate-colors-min.js" type="text/javascript"></script>
<script src="js/ddsmoothmenu.js" type="text/javascript"></script>
<script src="js/jquery.cssAnimate.mini.js" type="text/javascript"></script>
<script src="js/jquery.fitvids.js" type="text/javascript"></script>
<script src="js/jquery.flexslider-min.js" type="text/javascript"></script>
<script src="js/jquery.prettyPhoto.js" type="text/javascript"></script>
<script src="js/mediaelement-and-player.min.js"></script>
<script src="js/screen.js" type="text/javascript"></script>

<script src="js/blogcomment.js" type="text/javascript"></script>

</head>

<body>

	<!-- Site Backgrounds
    ================================================== -->

	<!-- Change to class="poswrapheaderline wide" and class="headerline full" for a full-width header line -->
	<div class="poswrapheaderline">
		<div class="headerline"></div>
	</div>
	<!-- Remove or uncomment depending on if you want a background image or tile -->
	<div class="tiledbackground"></div>
	<!--img src="images/bg.jpg" alt="" id="background" /-->
	<!-- Change to class="poswrapper wide" and class="whitebackground full" for a full-width site background -->
	<div class="poswrapper">
		<div class="whitebackground"></div>
	</div>

	<div class="container main portfolio4column">

	<!-- Header | Logo, Menu
    ================================================== -->
	<jsp:include page="head.jsp" />

	<!-- Page Title
	================================================== -->

	<div class="pagetitle">
		<div class="pagetitleholder">
			<h1>博客内容</h1>
		</div>
		<div class="socialholder">
				<ul class="socialicons">
				<c:choose>
					<c:when test="${!empty user}">
						<li>Hi!</li>
						<li><a href="UserInfo?id=${user.getID() }">${user.getID() }</a></li>
					</c:when>	
					<c:otherwise>
						<li><a href="login.jsp" class="linkbg">登陆</a></li>
						<li><a href="regist.jsp" class="linkbg">注册</a></li>
					</c:otherwise>
				</c:choose>				
				</ul>
			</div>
	</div>

	<!-- Body Content
    ================================================== -->
	<div class="sixteen columns row textblock blogsingle fullblog">
        
        	<!-- Blogpost -->
            <div class="blogpost row">
                <div class="blogdate">
                    <div class="month">${month }</div>
                    <div class="day">${day }</div>
                    <div class="year">${year }</div>
                </div>
                <div class="postholder">
                	<div class="blogtitle"><h4><a href="#">${blog.getBlogTitle() }</a></h4></div>
                    <div class="postinfo">
                        ${blog.getBlogDate() } <a href="#">Presentations</a> · by <a href="#">${blog.getUserID() }</a> · <a href="#">${bcresult.size() } Comments</a>
                    </div>
                    <div class="blogimage">
                        <div class="flexslider postslider clearfix">
                            <ul class="slides">
                            </ul>
                        </div>
                    </div>
                    <div class="postbody">
                        <div class="postcontent">
                    
                            <p>${blog.getBlogContent() }</p>
                            
                           <div class="clear"></div>
                    
                    	</div>
                    </div>
                </div>
                <div class="clear"></div>
            </div> 

            <!-- Post Comments -->
                    
            <div id="comments" class="sixteen columns row alpha">
                <h5 class="teaserheadline" style="margin-bottom:18px;">评 论</h5>
                
                <!-- Comment -->
                <ul>
                
                    <!-- Reply -->
                    
                    <c:forEach items="${bcresult }" var="blogcomms">
                    <c:if test="${(empty blogcomms.motherID) ||(blogcomms.motherID == 0) }">
                    <li class="depth-1">
                        <div class="commentwrap">
                        	<div class="replylink"><a href="#replyform" onclick="replyCommt(${blogcomms.ID})" ><span>&rarr;</span> 回复</a></div>
                            <div class="author" style="display:inline"><a href="#">${blogcomms.userID }</a></div>
                            <div class="timestamp" style="display:inline"><fmt:formatDate value="${blogcomms.date}" pattern="yyyy-MM-dd hh:mm:ss"/></div><div class="clear"></div>
                            <div class="postertext">
                                <p>${blogcomms.content }</p>            
                            </div><div class="clear"></div>
                        </div>
                    </li>
                    	<c:forEach items="${bcresult }" var="bcreplys">
                    	<c:if test="${bcreplys.motherID == blogcomms.ID }">
                    	<!--blogComment Reply -->
                    	<li class="depth-3">
                        	<div class="commentwrap">
                            	<div class="author" style="display:inline"><a href="#">${bcreplys.userID }</a></div>
                            	<div class="timestamp" style="display:inline"><fmt:formatDate value="${bcreplys.date}" pattern="yyyy-MM-dd hh:mm:ss"/></div><div class="clear"></div>
                            	<div class="postertext">
                                <p>${bcreplys.content }</p>            
                            	</div><div class="clear"></div>
                        	</div>
                    	</li>
                    	</c:if>
                    	</c:forEach>
                    </c:if>                    
                    </c:forEach>
                    
                    <br style="clear: left;"/>
                </ul>
                
                <div class="clear"></div>
            </div>
            
            <!-- Comment Form -->
                <h5 class="teaserheadline" style="margin-bottom:18px;">博客评论</h5>
            <div id="respond">
                <form id="replyform" method="post" action="BlogReply">
                	<input type="hidden" name="blogID" value="${blog.blogID }">
                	<input type="hidden" name="userID" value="${user.getID() }">
                	<input type="hidden" name="bcID" id="bcID" value="0">
                    <textarea name="replycontent" id="reply_message" class="requiredfield" onFocus="if(this.value == 'Message *') { this.value = ''; }" onBlur="if(this.value == '') { this.value = 'Message *'; }">Message *</textarea>
				<c:choose>
					<c:when test="${!empty user}">
	                    <input type="submit" name="send" style="color:white;width:120px;height:30px;font-weight:bold;font-size:14px;font-style:normal;border:1px solid #1a9775;background:#1ca37d"/ onmouseover="this.style.backgroundColor='#1a9775';" onmouseout="this.style.backgroundColor='#1ca37d';" value="提 交" />
					</c:when>	
					<c:otherwise>
					<div>您还未登录！请先<a href="login.jsp" class="linkbg">登陆</a>或<a href="regist.jsp" class="linkbg">注册</a></div>
					</c:otherwise>
				</c:choose>		
                </form>
            </div>
 
            <div class="clear"></div>
		</div>

	<div class="clear"></div>

	<!-- Bottom Padding Adjust
    ================================================== -->
	<div class="sixteen columns bottomadjust"></div>

	</div>
	<!-- container -->

	<!-- Footer
    ================================================== -->
	<jsp:include page="foot.jsp" />
	<!-- End Document
	================================================== -->
	<div style="display: none">
		<script src='http://v7.cnzz.com/stat.php?id=155540&web_id=155540'
			language='JavaScript' charset='gb2312'></script>
	</div>
</body>
</html>